// @ts-ignore
/* eslint-disable */
import request from "@/plugins/globalRequest";

/** 新增一条果蔬管理对象 POST /admin/addVegMan */
export async function addVegManUsingPOST(
  body: API.VegetableManagement,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultString_>('/admin/addVegMan', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除一条果蔬管理对象 DELETE /admin/deleteVegMan/${param0} */
export async function deleteVegManUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteVegManUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultString_>(`/admin/deleteVegMan/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 批量删除果蔬管理对象 DELETE /admin/deleteVegManList */
export async function deleteVegManListUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteVegManListUsingDELETEParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultString_>('/admin/deleteVegManList', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改果蔬管理对象 PUT /admin/modifyVegMan */
export async function modifyVegManUsingPUT(
  body: API.VegetableManagement,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultVegetableManagement_>('/admin/modifyVegMan', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询果蔬管理 GET /admin/queryAllVegMan */
export async function queryAllUsingGET2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryAllUsingGET2Params,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultPageQueryCondition_>('/vegetableManage/queryAllVegMan', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询一条果蔬管理对象 GET /admin/queryVegManById/${param0} */
export async function queryVegManByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryVegManByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultVegetableManagement_>(`/admin/queryVegManById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
